package com.example.listener;

import com.example.config.RabbitMQDirectConfig;
import com.example.pojo.UserDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author: 胡成
 * @Version: 0.0.1V
 * @Date: 2018/12/7
 * @Description: 类描述
 **/
@Slf4j
@Component
public class ReceiverDirectListener {

    @RabbitListener(queues = RabbitMQDirectConfig.QUEUE)
    public void receiverDirectQueue(UserDTO userDTO){
        log.info("【receiverDirectQueue监听到消息】"+userDTO.toString());
    }
}
